// 新增专属模板弹窗配置
export interface CreateTemplateForm {
  name: string
  platform: string
  workflowId: string
  version: string
}

export interface FormField {
  prop: keyof CreateTemplateForm
  label: string
  placeholder: string
  required?: boolean
  type: "input" | "select" | "radio-group"
  options?: Array<{ label: string, value: string }>
  rules?: any[]
}

export const createTemplateDialogConfig = {
  title: "新增专属模板",
  description: "为商家创建专属的推荐模板，该模板仅对此商家可见。",
  fields: [
    {
      prop: "name",
      label: "模板名称",
      placeholder: "如：火锅店专属探店模板",
      required: true,
      type: "input",
      rules: [
        { required: true, message: "请输入模板名称", trigger: "blur" },
        { min: 2, max: 50, message: "长度在 2 到 50 个字符", trigger: "blur" }
      ]
    },
    {
      prop: "platform",
      label: "适用平台",
      placeholder: "选择平台",
      required: true,
      type: "select",
      options: [
        { label: "抖音", value: "抖音" },
        { label: "小红书", value: "小红书" }
      ],
      rules: [
        { required: true, message: "请选择适用平台", trigger: "change" }
      ]
    },
    {
      prop: "workflowId",
      label: "爆款工作流链路ID",
      placeholder: "如：WF_HOTPOT_CUSTOM_REVIEW",
      required: true,
      type: "input",
      rules: [
        { required: true, message: "请输入工作流链路ID", trigger: "blur" },
        { min: 5, max: 100, message: "长度在 5 到 100 个字符", trigger: "blur" }
      ]
    },
    {
      prop: "version",
      label: "可用套餐等级",
      placeholder: "",
      required: true,
      type: "radio-group",
      options: [
        { label: "标准版", value: "标准版" },
        { label: "专业版 Pro", value: "Pro版" },
        { label: "专业版 Pro Max", value: "Pro Max版" }
      ],
      rules: [
        { required: true, message: "请选择套餐等级", trigger: "change" }
      ]
    }
  ]
}
